const path = require('path')
const resolve = (dir) => path.join(__dirname, dir);

module.exports = {
  productionSourceMap: false,
  publicPath: './',
  outputDir: 'dist',
  devServer: {

    proxy: {
      '/api-wound': {//请求称号
        target: 'http://119.3.56.222:20001', //请求的接口
        changeOrigin: true,//允许跨域
        pathRewrite: {
          '^/api-wound': '/'
        }
      }
    }
  },
  chainWebpack: (config) => {
    // 设置快捷路径， @ 表示 'src' ，components 表示 'src/components'
    config.resolve.alias
      .set('@', resolve('src'))
  },
};
